<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/EmptyPHPWebPage.php to edit this template
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        $file= fopen("1.html","r+") or exit("文件不存在");
        if($file){
            echo "<br/>文件可以被打开<br/>";
            //feof 判断是否读取到文件的结尾
            while (!feof($file))
            {
                echo fgetc($file)."<br>";
            }
        }else{
            echo "<br/>文件不存在！";
        }
        fwrite($file, "新增的内容\n");
//        mkdir("043001");
        rmdir("043001");
        mkdir("043002","0777");
        fclose(fopen("043002/abc.txt","w+"));
        if(unlink("043002/abc.txt")){
            echo "<br/>删除文件成功！<br/>";
        }
        fclose($file);
        ?>
    </body>
</html>
